package com.escool.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.escool.model.TbPeriodo;
import com.escool.model.TbTurno;
import com.escool.service.FindService;
import com.escool.service.PeriodoService;
import com.escool.service.TurnoService;

@Controller
public class FindController {
	@Autowired
	PeriodoService periodoService;
	
	@Autowired
	TurnoService turnoService;
	
	@Autowired
	FindService findServie;
	
	@RequestMapping("findTurno")
	public String findTurno(Map<String, Object> map){		
		map.put("turnoList", turnoService.listTurno());
		return "/findTurno";
	}
	
	@RequestMapping("findPeriodo")
	public String findPeriodo(Map<String, Object> map){		
		map.put("periodoList", periodoService.listPeriodo());
		return "/findPeriodo";
	}
	
	@RequestMapping("findSeccion")
	public String findSeccion(Map<String, Object> map){		
		map.put("seccionList", findServie.listVwSecciones());
		return "/findSeccion";
	}
	
	@RequestMapping("findSede")
	public String findSede(Map<String, Object> map){		
		map.put("sedeList", findServie.listVwSede());
		return "/findSede";
	}
	
	@RequestMapping("findPersonal")
	public String findPersonal(Map<String, Object> map){		
		map.put("personalList", findServie.listVwPersonal());
		return "/findPersonal";
	}
	
}
